public class J03change {
    public static void main(String[] args) {
        byte b1 = 3;
        int i1 = 100;

        //把byte转为int，自动转换
        i1 = b1;
        System.out.println(i1);

        double d1 = i1;
        System.out.println("强制转换，大范围->小范围");
        short s2 = 100;
        int i2 = 200;
        i2 = 2111111;
        //强转有风险，可能结果不对
        s2 = (short)i2;
        System.out.println(s2);

        int i3 = (int)3.94;
        System.out.println(i3);

    }
}
